﻿@{
    ViewBag.Title = "贷款记录查询 - 瀚华通";
    ViewBag.Keywords = "瀚华通,瀚华小额贷款,瀚华小贷,瀚华,在线信贷服务";
    ViewBag.Description = "瀚华通-在线信贷服务-贷款记录查询";
}
@section header{
    <style type="text/css">
        table td
        {
            font-size: 12px;
            line-height: 26px;
            padding-left: 14px;
        }
    </style>
    <script type="text/javascript">
        function loadDetail(bid) {
            //alert("001");
            //$(".detailDt").empty();
            //alert("002");
            var htmlname = "detailDt_" + bid;
            $("#" + htmlname).load(
            "/Query/GetDetails",
            {
                bId: bid
            });
            //alert("003");
        }

        function CloseDetail(bid) {
            var htmlname = "detailDt_" + bid;
            $("#" + htmlname).empty();
            $("#tr_" + bid).css({ 'height': '0' });
        }
    </script>
}
@section footer{
}
<div class="container">
    <div class="row">
        <div class="span12" id="dvSearchBar">
            <table class="table" style="background-color: #C40001;  margin-top:6px;">
                <tr>
                    <td style="line-height:27px;">
                        <span style="font-size:16px;color:#FFF">项目查询</span>
                    </td>
                    <td style="line-height:27px;text-align:right;padding-right:15px;">
                        <span><a href="/" style="font-size:16px;color:#FFF;">返回首页</a></span>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div class="row">
        <div class="span12">
            <table class="table table-bordered table-striped" style="font-size: 12px">
                <thead>
                    <tr>
                        <th width="10%" style="color: #333">
                            <b>业务ID</b>
                        </th>
                        <th width="10%" style="color: #333">
                            <b>客户名称</b>
                        </th>
                        <th width="10%" style="color: #333">
                            <b>放款日期</b>
                        </th>
                        <th width="12%" style="color: #333">
                            <b>还款方式</b>
                        </th>
                        <th width="12%" style="color: #333">
                            <b>贷款金额</b>
                        </th>
                        <th width="10%" style="color: #333">
                            <b>贷款期限</b>
                        </th>
                        <th width="6%" style="color: #333">
                            <b>月利率</b>
                        </th>
                        <th width="8%" style="color: #333">
                            <b>项目经理</b>
                        </th>
                        <th width="12%" style="color: #333">
                            <b>联系电话</b>
                        </th>
                        <th style="color: #333">
                            <b>操作</b>
                        </th>
                    </tr>
                </thead>
                @{
                    Library.Common.PagedResult<System.Data.DataSet> ls = (Library.Common.PagedResult<System.Data.DataSet>)Model;
                    if (ls != null && ls.Result.Tables.Count > 0 && ls.Result.Tables[0].Rows.Count > 0)
                    {
                        foreach (System.Data.DataRow d in ls.Result.Tables[0].Rows)
                        {
                    <tr>
                        <td bgcolor="#FFFFFF">
                            @d["业务ID"]
                        </td>
                        <td bgcolor="#FFFFFF">
                            @d["客户名称"]
                        </td>
                        <td>
                            @d["放款日期"].ToString().Replace("0:00:00", "")
                        </td>
                        <td bgcolor="#FFFFFF">
                            @d["还款方式"]
                        </td>
                        <td bgcolor="#FFFFFF" style="text-align:right;padding-right:16px;">
                            @((Library.Common.Utils.StrToFloat(d["贷款金额"].ToString(), 0F).ToString("#,##0"))) 元
                        </td>
                        <td bgcolor="#FFFFFF">
                            @d["贷款期限"] 天
                        </td>
                        <td bgcolor="#FFFFFF">
                            @d["月利率"]
                        </td>
                        <td bgcolor="#FFFFFF">
                            @d["项目经理"]
                        </td>
                        <td bgcolor="#FFFFFF">
                            @d["联系电话"]
                        </td>
                        <td bgcolor="#FFFFFF">
                            <input type="button" onclick="loadDetail(@d["业务ID"])" value="详情" />
                            <input type="button" onclick="CloseDetail(@d["业务ID"])" value="收起" />
                        </td>
                    </tr>       
                    <tr id="tr_@(d["业务ID"])">
                        <td colspan="10">
                            <div id="@("detailDt_" + d["业务ID"])" class="detailDt">
                            </div>
                        </td>
                    </tr>
                        }
                    }
                }
            </table>
            <div class="ft">
                @Html.Partial("~/Views/Shared/PagerControl.cshtml",
                          new Dictionary<string, string> { 
                          { "PageCount", ls.PagedInfo.PageCount.ToString() }, 
                          { "RecordCount", ls.PagedInfo.RecordCount.ToString() }, 
                          { "PageSize", ls.PagedInfo.PageSize.ToString() }, 
                          { "PageIndex", ls.PagedInfo.PageIndex.ToString() }, 
                          //{ "Paremeters", ViewData["idCard"].ToString()},
                          { "Controller", "query" }, 
                          { "Action", ViewContext.RouteData.Values["action"].ToString() } 
                          })
            </div>
            <p style="clear: both;">
            </p>
        </div>
    </div>
<div class="span12" style="border-top:1px solid #DDD;margin-left:0; "></div>
</div>